package com.sunmouse.toollib.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by Kvin on 2017/5/5.
 */
public class BaseReceiver extends BroadcastReceiver {
    protected OnReceiveListener mOnReceiveListener;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (mOnReceiveListener != null)
            mOnReceiveListener.onReceive(context, intent);
    }

    /**
     * on receiver listener
     */
    public void setOnReceiveListener(OnReceiveListener listener) {
        this.mOnReceiveListener = listener;
    }
}
